A bonding technique is heretofore known which bonds a plurality of semiconductor substrates together. In this bonding technique, a semiconductor substrate having a semiconductor element, such as a memory, formed therein and a semiconductor substrate having a peripheral circuit for the semiconductor element formed therein are bonded together. In bonding the semiconductor substrates, metal films serving as pads may be joined together. The surface of each metal film except a junction surface may be covered with an insulating film.